package com.wyx.service.impl;

import com.wyx.mapper.CategoryMapper;
import com.wyx.pojo.Category;
import com.wyx.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public int insertCategory(Category category) {
        return categoryMapper.insertCategory(category);
    }

    @Override
    public int deleteCategoryById(int id) {
        return categoryMapper.deleteCategoryById(id);
    }

    @Override
    public int updateCategoryById(Category category) {
        return categoryMapper.updateCategoryById(category);
    }

    @Override
    public List<Category> selectCategoryByAll(Category category) {
        return categoryMapper.selectCategoryByAll(category);
    }
}
